//Source file: D:\\test\\com\\ce\\pms\\custservice\\model\\ReturnVisitRuleDO.java

package com.ce.pms.system.custservice.model;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.ce.pms.common.model.SysInfo;
import com.sitechasia.webx.core.model.IDomainObject;


/**
 * 实体名称:回访规则  关联数据表:CE_RETURN_VISIT_RULE
 *
 * @author 黄彦军 创建日期：2008-12-8
 */
@Entity
@Table(name = "CE_RETURN_VISIT_RULE")
public class ReturnVisitRuleDO implements IDomainObject
{
	/**
	 * 有效
     */
	public static final String RETURN_VISIT_RULE_STATUZ_AVAILABILITY   = "1";

	/**
	 * 无效
     */
	public static final String RETURN_VISIT_RULE_STATUZ_INEFFICACY   = "0";

	/**
	 * 关键字
	 */
    @Id
	@GeneratedValue
	@Column(name = "RETURN_VISIT_RULE",nullable = false)
   private Long keyword;

   /**
    * 回访规则名称
    */
    @Column(name = "NAME",length = 20, nullable = false)
   private String name;

   /**
    * 备注
    */
    @Column(name = "REMARK",length = 200)
   private String remark;

   /**
    * 序号
    */
    @Column(name = "SEQUENCE")
   private Short sequence;

   /**
    * 有效性 1有效;0无效
    */
    @Column(name = "VALIDITY",length = 1, nullable = false)
   private String validity;

    /**
     *事件类型
     */
   // @org.hibernate.annotations.Cascade(value = { org.hibernate.annotations.CascadeType.SAVE_UPDATE})
    @OneToOne( cascade={},fetch=FetchType.LAZY)
	@JoinColumn(name = "CUST_EVENT_KIND_ID")
   public CustEventKindDO custServEventKind;


    /**
     * 紧急程度
     */
   // @org.hibernate.annotations.Cascade(value = { org.hibernate.annotations.CascadeType.SAVE_UPDATE})
    @OneToOne( cascade={},fetch=FetchType.LAZY)
	@JoinColumn(name = "EMERGENCY_DEGREE_ID")
   public EmergencyDegreeDO emergencyDegree;

    /**
	 * 系统信息
	 */
	@Embedded
	private SysInfo sysInfo;

   /**
    * @roseuid 4937AB3300DA
    */
   public ReturnVisitRuleDO(){
   }

   /**
    * @param keyword
    * @return com.ce.pms.custservice.model.ReturnVisitRuleDO
    * @roseuid 492B9E890271
    */
   public ReturnVisitRuleDO(Long keyword)
   {
	   this.keyword = keyword;
   }

	public CustEventKindDO getCustServEventKind() {
		return custServEventKind;
	}

	public void setCustServEventKind(CustEventKindDO custServEventKind) {
		this.custServEventKind = custServEventKind;
	}

	public EmergencyDegreeDO getEmergencyDegree() {
		return emergencyDegree;
	}

	public void setEmergencyDegree(EmergencyDegreeDO emergencyDegree) {
		this.emergencyDegree = emergencyDegree;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Short getSequence() {
		return sequence;
	}

	public void setSequence(Short sequence) {
		this.sequence = sequence;
	}

	public SysInfo getSysInfo() {
		return sysInfo;
	}

	public void setSysInfo(SysInfo sysInfo) {
		this.sysInfo = sysInfo;
	}

	public String getValidity() {
		return validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}
}
